package com.amazing.sudoku.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.amazing.sudoku.R;

/**
 * 欢迎界面
 */
public class WelcomeActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        Intent intent = new Intent(WelcomeActivity.this, EntryActivity.class);
        new Thread(() -> {
            try{
                Thread.sleep(2000);
                startActivity(intent);
            } catch (Exception e){
                e.printStackTrace();
            }
        }).start();
        View imgView = findViewById(R.id.iv_icon);
        imgView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(intent);
            }
        });
    }
}